#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 5e4 + 5;

int n, m;
int year[N], rain[N];
int mx[N << 2];
void update(int pos, int val, int p, int l, int r) {
  if (l == r) {
    mx[p] = val;
    return;
  }
  int mid = (l + r) >> 1;
  if (pos <= mid)
    update(pos, val, p << 1, l, mid);
  else
    update(pos, val, p << 1 | 1, mid + 1, r);
  mx[p] = max(mx[p << 1], mx[p << 1 | 1]);
}
int query(int L, int R, int p, int l, int r) {
  if (L > R) return 0;
  if (L <= l && R >= r) return mx[p];
  int mid = (l + r) >> 1;
  int ans = 0;
  if (L <= mid) ans = max(ans, query(L, R, p << 1, l, mid));
  if (R > mid) ans = max(ans, query(L, R, p << 1 | 1, mid + 1, r));
  return ans;
}
int check(int x, int y) {
  int idx = lower_bound(year + 1, year + n + 1, x) - year;
  int idy = lower_bound(year + 1, year + n + 1, y) - year;
  bool findx = idx <= n && year[idx] == x;
  bool findy = idy <= n && year[idy] == y;
  if (!findx) idx--;
  int mx = query(idx + 1, idy - 1, 1, 1, n);
  if (findx && findy && idy - idx == y - x && rain[idx] >= rain[idy] &&
      rain[idy] > mx)
    return 0;  // true
  else if ((findx && mx >= rain[idx]) || (findy && mx >= rain[idy]) ||
           (findx && findy && rain[idy] > rain[idx]))
    return -1;
  else
    return 1;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  rep(i, 1, n) {
    cin >> year[i] >> rain[i];
    update(i, rain[i], 1, 1, n);
  }
  cin >> m;
  while (m--) {
    int x, y;
    cin >> x >> y;
    int res = check(x, y);
    if (res == 0)
      cout << "true\n";
    else if (res == 1)
      cout << "maybe\n";
    else
      cout << "false\n";
  }
  return 0;
}